package cn.whit.blog.service;

import java.sql.SQLException;
import java.util.List;

import cn.whit.blog.domain.StatisticalType;
import cn.whit.blog.domain.Tblog;
import cn.whit.blog.util.DynamicQuery;
import cn.whit.blog.util.PageModel;

public interface TblogService {
	List<Tblog> findAllWithPageAndQuery(int startIndex, int pageSize, DynamicQuery query) throws Exception;

	int findTotalRecordsAndQuery(DynamicQuery query) throws Exception;

	PageModel findByPageAndQuery(int startIndex, int pageSize, DynamicQuery query) throws Exception;

	long save(Tblog tblog) throws SQLException;

	Tblog findById(String id) throws SQLException;

	void addvote(String id, String userid,String username, StatisticalType statisticalType) throws SQLException;

	void deleteById(String s) throws SQLException;

	List<Tblog> findByUserId(String s)  throws SQLException;
}
